﻿using System;

namespace Moe.ECamel.Common.Utils
{
	public interface IClock
	{
		DateTime Now { get; }
		DateTime Today { get; }

		bool Readonly { get; }
		void ChangeCurrentDateTime(DateTime newValue);
		event EventHandler<ClockChangedEventArgs> ClockChanged;
	}

	public class ClockChangedEventArgs : EventArgs
	{
		public readonly DateTime OldDateTime;
		public readonly DateTime NewDateTime;

		public ClockChangedEventArgs(DateTime oldTime, DateTime newtime)
		{
			this.OldDateTime = oldTime;
			this.NewDateTime = newtime;
		}
	}
}
